home *** CD-ROM | disk | FTP | other *** search
/ ASME's Mechanical Engine…ing Toolkit 1997 December / ASME's Mechanical Engineering Toolkit 1997 December.iso / c_lang / varinc.lzh / PAGE247.C < prev    next >
Text File  |  1979-11-30  |  882b  |  23 lines

  1. struct term_msg                           /* Declare structure tag term_msg. */
  2.    {
  3.    short row, col;                                        /* screen location */
  4.    char *msg;                                          /* message to display */
  5.    };
  6.  
  7. /* Paint the screen with an array of field names. */
  8. void scrn_pnt(form)
  9. struct term_msg form[];
  10.    {
  11.    void s_tput(struct term_msg *);            /* structure version of tput() */
  12.    short imsg;
  13.    for (imsg = 0; form.msg != NULL; ++imsg)
  14.       s_tput(&form[imsg]); /* Pass structure address to function listed next.*/
  15.  
  16. /* The structure version of tput() prints a message on the */
  17. /*   screen by calling the order-entry function tput().    */
  18. void s_tput(p_form)
  19. struct term_msg *p_form;     /* p_form is a pointer to a term_msg structure. */
  20.    {
  21.    tput(p_form->row, p_form->col, p_form->msg);
  22.    }   
  23.